<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>钱包盒子-服务</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../Public/css/Home/mui.css" />
		<link rel="stylesheet" href="../Public/css/Home/public.css" />
		<link rel="stylesheet" href="../Public/css/Home/main.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">文章详情</h1>
		</header>
		<div class="mui-content mui-scroll-wrapper">
			<div class="mui-scroll">
				<div class="news-detail">
					<div id="newsTit" class="tit"></div>
					<div id="newsTime" class="time"></div>
					<div id="newsCont" class="cont"></div>
				</div>
			</div>
		</div>
	</body>
	<script src="../Public/js/Home/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../Public/js/Home/mui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../Public/js/Home/common.js" type="text/javascript" charset="utf-8"></script>
	<script src="../Public/js/Home/php.date.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var newsId;
		mui.init();

		mui('.mui-scroll-wrapper').scroll({
			deceleration: 0.0005
		});
		
		$(function() {
			newsId = common.getLocVal("newsId");
			init();
		});

		function init() {
			var params = {
				url: 'News/getNewsInfoById',
				data: {
					newsId: newsId
				}
			}
			common.JsonPost(params, function (data) {
				document.getElementById("title").innerHTML = data.newsCate.cate_name;
				document.getElementById("newsTit").innerHTML = data.newsInfo.title;
				document.getElementById("newsTime").innerHTML = date('Y-m-d', data.newsInfo.create_time);
				document.getElementById("newsCont").innerHTML = htmldecode(data.newsInfo.content);
			});
		}


		function htmldecode(str) {
			var s = "";
			if(str.length == 0) return "";
			s = str.replace(/&amp;/g, "&");
			s = s.replace(/&lt;/g, "<");
			s = s.replace(/&gt;/g, ">");
			s = s.replace(/&nbsp;/g, " ");
			s = s.replace(/&#39;/g, "\'");
			s = s.replace(/&quot;/g, "\"");

			s = s.replace(/\/upload\/ueditor/g, "https:\/\/dk.9ok.xin\/upload\/ueditor");
			return s;
		}
	</script>

</html>